package com.dls.admin.service.impl;

import com.dls.admin.dao.GoodsMapper;
import com.dls.admin.model.Goods;
import com.dls.admin.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsServiceImpl implements GoodsService {

    @Autowired
    GoodsMapper goodsMapper;

    @Override
    public List<Goods> findGoodsList(Goods goods) {
        List<Goods> goodsList = goodsMapper.findGoodsList(goods);
        return goodsList;
    }

    @Override
    public void insert(Goods goods) {
        goodsMapper.insert(goods);
    }

    @Override
    public void deleteGoodById(String id) {
        goodsMapper.deleteByPrimaryKey(Integer.valueOf(id));
    }


}
